package day04;
import javax.xml.bind.annotation.XmlType;
import java.util.Scanner;
public class CommandBySwitch {
    public static void main(String[] args) {
       Scanner scan=new Scanner(System.in);

       //int num =scan.nextInt();
       //计算1~100的和
        int a=0;//和
        int b=1;//声明变量
                //变量条件
        while (b<=100){
            a+=b;
            b++;//变量因素
        }
        System.out.println("a="+a);










      /*  int num=(int) (Math.random()*500+1);
        System.out.println("猜吧" );
        int guess=scan.nextInt();
        while (guess!=num){
           if (guess>num){
                System.out.println("猜大了");
            }else {
                System.out.println("猜小了");
            }
            System.out.println("接着猜");
            guess=scan.nextInt();
        }
        System.out.println("猜对了");*/
        /*
       System.out.println("请选择功能：1.接通 2.拒绝 3.举报 4.拉黑");

      int phone=scan.nextInt();
       switch (phone){
           case 1:
               System.out.println("已接通");
               break;
           case 2:
               System.out.println("已拒绝");
               break;
           case 3:
               System.out.println("已举报");
               break;
           case 4:
               System.out.println("已拉黑");
               break;
           default:
               System.out.println("输入错误");
       }

       */

    }
}
